package tiandang.core.service;

import tiandang.core.error.BusinessException;
import tiandang.core.model.OrderInfo;
import tiandang.core.model.OrderProduct;

import java.util.List;

public interface OrderService {

  Object getList(Long startTimestamp, Long endTimestamp, String managerName,
                 String productName, Integer deliveryStatus, String orderId,
                 Integer currentPage, Integer limit);

  OrderInfo getOrderById(String orderId);

  OrderInfo createOrder(OrderInfo order) throws BusinessException;

  //退款
  void refund(String id) throws BusinessException;

  //发货
  void deliverProduct(String id);

  //根据orderId查询所购买的商品
  List<OrderProduct> getOrderProductListByOrderId(String orderId);

  List<OrderInfo> getListByPromoId(Integer promoId);

  void updatePayStatusByOrderId(String orderId);

  Object getListByOpenid(String openid, Integer currentPage, Integer limit);

  List<OrderInfo> getUnPayOrder();

  //修改订单状态
  void updateOrderStatus(String orderId, Integer orderStatus);

  List<OrderInfo> getPayedAndCancelStatusOrder();
}
